import request from '@/utils/request'

export function getFunctionList(data) {
  return request({
    url: '/system/function/query/page',
    method: 'post',
    data
  })
}

export function editFunction(data) {
  return request({
    url: '/system/function/updateFunction',
    method: 'put',
    data
  })
}

export function addFunction(data) {
  return request({
    url: '/system/function/insertFunction',
    method: 'post',
    data
  })
}

export function deleteFunction(data) {
  return request({
    url: '/system/function/delete/' + data.functionId,
    method: 'delete',
    data
  })
}

export function getAllFunction() {
  return request({
    url: '/system/function/query/all',
    method: 'get'
  })
}
